
<!doctype html>
<html>
<head>
<title>修改考勤排班</title> <#include "../../commonUse.html"/>

<script
	src="${ctx.contextPath}/pages/business/attendance/js/attendance_update.js"></script>
<script src="${ctx.contextPath}/js/validator.js"></script>
<script type="text/javascript">
	var engId = '${attend.ENGINEER_ID}';
	var dbType = '${attend.DEBIT_TYPE}';
	var pNum = '';
	var wkId = '${wokIds}';
	var jobnos = '${wokIds}';
</script>
</head>
<body>
	<div class="smart-body">
		<div class="border1pxe6">
			<div class="layui-layer-title">修改考勤排班</div>
			<div class="smart-cell smart-cell_lt">
				<blockquote class="layui-elem-quote layui-quote-nm">设置考勤时间</blockquote>
				<form id="form1" action="" class="layui-form">
					<input type="hidden" name="recId" value="${attend.REC_ID}" />
					<div class="layui-form-item">
						<label class="layui-form-label">排班名称<font
							class="smart-required">*</font></label>
						<div class="layui-input-inline">
							<input type="text" name="orgName" id="orgName" placeholder="请输入"
								class="layui-input" value="${attend.ORG_NAME}" dataType="LimitA"
								msg="排班名称不能为空.">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">所属项目<font
							class="smart-required">*</font></label>
						<div class="layui-input-inline">
							<select id="engineerId" name="engineerId"
								class="smart-body_select" dataType="LimitA" msg="所属项目不能为空.">
								<option VALUE="">请选择</option> <#list projectList as l> <#if
								l.PROJECT_ID == "${attend.ENGINEER_ID}">
								<option VALUE="${l.PROJECT_ID}" selected='selected'>${l.PROJECT_NAME}</option>
								<#else>
								<option VALUE="${l.PROJECT_ID}">${l.PROJECT_NAME}</option>
								</#if> </#list>
							</select> <input type="hidden" name="engineerName" id="engineerName"
								value="${attend.ENGINEER_NAME}" />
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">有效日期<font
								class="smart-required">*</font></label>
							<div class="layui-input-inline" style="width: 115px;">
								<input readonly="readonly" name="begTime" style="width: 115px;"
									id="begTime" type="text" class="search_input_sc Wdate"
									class="text" dataType="LimitA" msg="有效开始时间不能为空."
									value="${attend.BEG_TIME}" />
							</div>
							<div class="layui-form-mid">-</div>
							<div class="layui-input-inline" style="width: 115px;">
								<input readonly="readonly" name="endTime" style="width: 115px;"
									id="endTime" type="text" class="search_input_sc Wdate"
									class="text" dataType="LimitA" msg="有效结束时间不能为空."
									value="${attend.END_TIME}" />
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label" style="width: 105px;">考勤开始时间<font
							class="smart-required">*</font></label>
						<div class="layui-input-inline" style="width: 270px;">
							每天 <input readonly="readonly" name="startTime"
								style="width: 100px" id="startTime" type="text"
								class="search_input_sc Wdate"
								onclick="WdatePicker({lang:'zh-cn',dateFmt:'HH:mm:ss',quickSel:['%H-00-00','%H-30-00','%H-60-00','%H-90-00','%H-120-00']})"
								value="${attend.START_TIME}" dataType="LimitA" msg="考勤开始时间不能为空." />
							开始新的一天考勤
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">首次签到<font
								class="smart-required">*</font></label>
							<div class="layui-input-inline" style="width: 100px;">
								<input readonly="readonly" name="signTime" id="signTime"
									type="text" class="search_input_sc Wdate"
									value="${attend.SIGN_TIME}" dataType="LimitA" msg="首次签到不能为空." />
							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label">首次签退<font
								class="smart-required">*</font></label>
							<div class="layui-input-inline" style="width: 100px;">
								<input readonly="readonly" name="signoutTime" id="signoutTime"
									type="text" class="search_input_sc Wdate"
									value="${attend.SIGNOUT_TIME}" dataType="LimitA"
									msg="首次签退不能为空." /></input>
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">二次签到</label>
							<div class="layui-input-inline" style="width: 100px;">
								<input readonly="readonly" name="signTime2" id="signTime2"
									type="text" class="search_input_sc Wdate"
									value="${attend.SIGN_TIME2}" />
							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label">二次签退</label>
							<div class="layui-input-inline" style="width: 100px;">
								<input readonly="readonly" name="signoutTime2" id="signoutTime2"
									type="text" class="search_input_sc Wdate"
									value="${attend.SIGNOUT_TIME2}" /></input>
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label" style="width: 120px;">迟到/早退(分钟)<font
							class="smart-required">*</font></label>
						<div class="layui-input-inline" style="width: 40px;">
							<input type="text" maxlength="2" id="lateTmie1" onchange="lateTmies2()"
								name="lateTmie1" required placeholder="0" class="layui-input"
								value="${attend.LATE_TMIE1}" dataType="Number" msg="迟到/早退不能为空且为正数.">
						</div>
						<div class="layui-form-mid layui-word-aux">以内忽略</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label" style="width: 120px;">迟到/早退(分钟)<font
								class="smart-required">*</font></label>
							<div class="layui-input-inline" style="width: 40px;">
								<input type="text" id="lateTmie2" name="lateTmie2" readonly="readonly"
									placeholder="0" autocomplete="off" class="layui-input"
									value="${attend.LATE_TMIE2}" dataType="Number" msg="迟到/早退不能为空且为正数.">
							</div>
							<div class="layui-form-mid">-</div>
							<div class="layui-input-inline" style="width: 40px;">
								<input type="text" id="lateTmie3" name="lateTmie3"
									placeholder="0" autocomplete="off" class="layui-input" onchange="exceedTimes()"
									value="${attend.LATE_TMIE3}" dataType="Number" msg="迟到/早退不能为空且为正数.">
							</div>
							<div class="layui-form-mid layui-word-aux">
							发生扣款<font class="smart-required">*</font>
						</div>
						<div class="layui-input-inline" style="width: 40px;">
							<input type="text" name="timeBase" placeholder="0" id="timeBase" value="${attend.TIMEBASE}"
								autocomplete="off" class="layui-input" dataType="Number" msg="时间基数不能为空且为正数">
						</div>
						<div class="layui-form-mid">分钟x</div>
						<div class="layui-input-inline" style="width: 40px;">
							<input type="text" name="debitType" placeholder="0" value="${attend.DEBIT_TYPE}"
								autocomplete="off" class="layui-input" id="debitType" dataType="Number" msg="扣款金额不能为空且为正数">
						</div>
						<div class="layui-form-mid">元</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 120px;">迟到/早退(分钟)</label>
					<div class="layui-input-inline" style="width: 40px;">
						<input readonly="readonly" id="exceedTime" type="text" maxlength="2" name="exceedTime" required
							placeholder="0" class="layui-input" value="${attend.LATE_TMIE3}">
					</div>
					<div class="layui-form-mid layui-word-aux">分钟以上 视为旷工 ，不计入考勤工时</div>
				</div>
					<input type="hidden" id="pNumber" name="pNumber" class="text"
						value=""></input>
				</form>
			</div>
			<div class="smart-cell smart-cell_rt">
				<blockquote class="layui-elem-quote layui-quote-nm">应用到工人</blockquote>
				<div class="smart-table_toptit">
					当前应用人数: <span id="pNum">0</span>
					<div class="smart-table_toptit_rt">
						<a href="#" onclick="workerAdd()">新增工人</a>
					</div>

				</div>
				<table class="layui-table" lay-skin="line">
					<thead>
						<tr>
							<th>姓名</th>
							<th>工号</th>
							<th>工种</th>
							<th>班组</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody id="tbodyData">

					</tbody>
				</table>
				<!--           ######分页开始 ######             -->

				<div class="tableData"></div>

				<!--           ######分页结束 ######              -->
			</div>
			<div class="smart-footer_btn">
				<button class="layui-btn layui-btn-primary"
					onclick="closeAttendance();">取消</button>
				<button class="layui-btn" onclick="attendanceAdd()">保存</button>
			</div>
		</div>
	</div>
</body>

</html>